{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=1037
  Verdict: Accepted
}
var n,i,k:longint;
begin
assign(input,'input.txt');
assign(output,'output.txt');
reset(input);
rewrite(output);
readln(n);
i:=2;
k:=trunc(sqrt(n));
while (n mod i>0) and (i<=k) do inc(i);
if n mod i=0 then write(n div i,' ',n-n div i) else write(n-1,' ',1);
end.